package nc.ui.pr.pr1111;

import java.util.Hashtable;

import nc.bs.framework.common.NCLocator;
import nc.itf.fdc.pub.IFdcPubServ;
import nc.ui.pr.pub.bsdelegate.PRBusinessDelegator;
import nc.vo.crmbd.pub.PRRentCusfrmodeVO;
import nc.vo.fdc.pub.QueryInfoVO;
import nc.vo.pr.pr1110.RentBailVO;
import nc.vo.pr.pr1110.RentBrdcatVO;
import nc.vo.pr.pr1110.RentExtractstandVO;
import nc.vo.pr.pr1110.RentFinancesplitVO;
import nc.vo.pr.pr1110.RentFreeVO;
import nc.vo.pr.pr1110.RentHouseVO;
import nc.vo.pr.pr1110.RentLesseeVO;
import nc.vo.pr.pr1110.RentSplitVO;
import nc.vo.pr.pr1110.RentStandardVO;


public class PRRentFTADelegater extends PRBusinessDelegator {


	public String[] getChildVONames() {
		return new String[] {
				RentBailVO.class.getName(),
				RentLesseeVO.class.getName(),
				RentHouseVO.class.getName(),
				RentStandardVO.class.getName(),
				RentSplitVO.class.getName(),
				RentFinancesplitVO.class.getName(),
				RentBrdcatVO.class.getName(),
				RentFreeVO.class.getName(),
				PRRentCusfrmodeVO.class.getName(),
				RentExtractstandVO.class.getName()
				
		};
	}

	@SuppressWarnings("unchecked")
	public Hashtable loadChildDataAry(String[] tableCodes, String key)
			throws java.lang.Exception {
  
//		Hashtable retHt = new Hashtable();
//		if (getChildVONames() != null) {
//			for (int i = 0; i < getChildVONames().length; i++) {
//
//				CircularlyAccessibleValueObject[] childVOs = queryBodyAllData(
//						Class.forName(getChildVONames()[i]),
//						IBillType.MANAGEMENT_NODE_RENTPACT, key, null);
//				if (childVOs != null) {
//					retHt.put(tableCodes[i], childVOs);
//				}
//			}
//		}
//
//		return retHt;
		QueryInfoVO[] vos = new QueryInfoVO[]{
				new QueryInfoVO(tableCodes[0],RentBailVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[1],RentLesseeVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[2],RentHouseVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[3],RentStandardVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[4],RentSplitVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[5],RentFinancesplitVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[6],RentBrdcatVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[7],RentFreeVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[8],PRRentCusfrmodeVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0"),
				new QueryInfoVO(tableCodes[9],RentExtractstandVO.class,"pk_pact='" + key + "' and isnull(dr,0)=0")
		};
		return NCLocator.getInstance().lookup(IFdcPubServ.class).queryChildDatas(vos);
	}
}
